object Form4: TForm4
  Left = 0
  Top = 0
  Caption = 'Form4'
  ClientHeight = 586
  ClientWidth = 872
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  object Label6: TLabel
    Left = 567
    Top = 280
    Width = 28
    Height = 13
    Caption = 'Filter:'
  end
  object Label7: TLabel
    Left = 27
    Top = 374
    Width = 28
    Height = 13
    Caption = 'Filter:'
  end
  object pageControl: TPageControl
    Left = 8
    Top = 17
    Width = 761
    Height = 488
    ActivePage = turnierTS
    TabOrder = 0
    object turnierTS: TTabSheet
      Caption = 'Turnierinfos'
      ExplicitHeight = 533
      object Label1: TLabel
        Left = 48
        Top = 48
        Width = 31
        Height = 13
        Caption = 'Name:'
      end
      object Label2: TLabel
        Left = 48
        Top = 75
        Width = 35
        Height = 13
        Caption = 'Datum:'
      end
      object Label3: TLabel
        Left = 48
        Top = 107
        Width = 68
        Height = 13
        Caption = 'Beschreibung:'
      end
      object nameE: TEdit
        Left = 149
        Top = 48
        Width = 121
        Height = 21
        TabOrder = 0
        Text = 'nameE'
      end
      object datumE: TEdit
        Left = 149
        Top = 75
        Width = 121
        Height = 21
        TabOrder = 1
        Text = 'datumE'
      end
    end
    object teilnehmerTS: TTabSheet
      Caption = 'Teilnehmer'
      ImageIndex = 1
      OnShow = teilnehmerTSShow
      ExplicitHeight = 533
      object DBGrid1: TDBGrid
        Left = 394
        Top = 266
        Width = 354
        Height = 189
        DataSource = queryCombinationDS
        Options = [dgTitles, dgIndicator, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
        ReadOnly = True
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'Tahoma'
        TitleFont.Style = []
        Columns = <
          item
            Expanded = False
            FieldName = 'Gruppe'
            Width = 70
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'Nick'
            Width = 120
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'Team'
            Width = 120
            Visible = True
          end>
      end
      object leagueLB: TDBLookupListBox
        Left = 8
        Top = 191
        Width = 105
        Height = 264
        KeyField = 'id'
        ListField = 'name'
        ListSource = Form1.leaguesDS
        TabOrder = 1
        OnClick = leagueLBClick
      end
      object teamLB: TDBLookupListBox
        Left = 119
        Top = 191
        Width = 153
        Height = 264
        KeyField = 'id'
        ListField = 'name'
        ListSource = queryTeamDS
        TabOrder = 2
        OnClick = teamLBClick
      end
      object hinzufuegenB: TButton
        Left = 512
        Top = 191
        Width = 238
        Height = 33
        Caption = 'Hinzuf'#252'gen'
        TabOrder = 3
        OnClick = hinzufuegenBClick
      end
      object userLB: TDBLookupListBox
        Left = 278
        Top = 191
        Width = 110
        Height = 264
        KeyField = 'id'
        ListField = 'nick'
        ListSource = Form1.usersDS
        TabOrder = 4
        OnClick = userLBClick
      end
      object CombiLoeschenB: TButton
        Left = 510
        Top = 227
        Width = 238
        Height = 33
        Caption = 'L'#246'schen'
        TabOrder = 5
        OnClick = CombiLoeschenBClick
      end
      object stageLB: TDBLookupListBox
        Left = 394
        Top = 191
        Width = 110
        Height = 69
        KeyField = 'id'
        ListField = 'name'
        ListSource = queryStageDS
        TabOrder = 6
        OnClick = stageLBClick
      end
      object Panel1: TPanel
        Left = 140
        Top = 19
        Width = 110
        Height = 150
        TabOrder = 7
        object teamIMG: TImage
          Left = 5
          Top = 5
          Width = 100
          Height = 100
          Proportional = True
          Stretch = True
        end
        object ratingIMG: TImage
          Left = 5
          Top = 111
          Width = 100
          Height = 34
          Center = True
          Proportional = True
          Stretch = True
        end
        object Panel2: TPanel
          Left = -111
          Top = 20
          Width = 110
          Height = 110
          TabOrder = 0
          object Image1: TImage
            Left = 5
            Top = 5
            Width = 100
            Height = 100
            Proportional = True
          end
        end
      end
      object Panel3: TPanel
        Left = 3
        Top = 19
        Width = 110
        Height = 150
        TabOrder = 8
        object leagueIMG: TImage
          Left = 5
          Top = 5
          Width = 100
          Height = 100
          Proportional = True
          Stretch = True
        end
        object liganameL: TLabel
          Left = 5
          Top = 121
          Width = 51
          Height = 14
          Caption = 'Liganame'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -12
          Font.Name = 'Tahoma'
          Font.Style = []
          ParentFont = False
        end
        object Panel4: TPanel
          Left = -111
          Top = 20
          Width = 110
          Height = 110
          TabOrder = 0
          object Image3: TImage
            Left = 5
            Top = 5
            Width = 100
            Height = 100
            Proportional = True
          end
        end
      end
      object Panel5: TPanel
        Left = 278
        Top = 19
        Width = 110
        Height = 150
        TabOrder = 9
        object nachnameL: TLabel
          Left = 5
          Top = 82
          Width = 84
          Height = 18
          Caption = 'nachnameL'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -15
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
        end
        object vornameL: TLabel
          Left = 5
          Top = 49
          Width = 80
          Height = 19
          Caption = 'vornameL'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -16
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
        end
        object Panel6: TPanel
          Left = -111
          Top = 20
          Width = 110
          Height = 110
          TabOrder = 0
          object Image4: TImage
            Left = 5
            Top = 5
            Width = 100
            Height = 100
            Proportional = True
          end
        end
      end
      object Panel7: TPanel
        Left = 394
        Top = 19
        Width = 110
        Height = 150
        TabOrder = 10
        object gruppeL: TLabel
          Left = 11
          Top = 60
          Width = 88
          Height = 23
          Caption = 'Gruppe A'
          Font.Charset = DEFAULT_CHARSET
          Font.Color = clWindowText
          Font.Height = -19
          Font.Name = 'Tahoma'
          Font.Style = [fsBold]
          ParentFont = False
        end
        object Panel8: TPanel
          Left = -111
          Top = 20
          Width = 110
          Height = 110
          TabOrder = 0
          object Image2: TImage
            Left = 5
            Top = 5
            Width = 100
            Height = 100
            Proportional = True
          end
        end
      end
    end
    object spieleTS: TTabSheet
      Caption = 'Spiele'
      ImageIndex = 2
      OnShow = spieleTSShow
      ExplicitHeight = 533
      object Label4: TLabel
        Left = 511
        Top = 191
        Width = 28
        Height = 13
        Caption = 'Filter:'
      end
      object newMatchB: TButton
        Left = 511
        Top = 227
        Width = 191
        Height = 25
        Caption = 'Neues Spiel'
        TabOrder = 0
        OnClick = newMatchBClick
      end
      object matchDB: TDBGrid
        Left = 3
        Top = 3
        Width = 502
        Height = 454
        DataSource = queryMatchDS
        ReadOnly = True
        TabOrder = 1
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'Tahoma'
        TitleFont.Style = []
        Columns = <
          item
            Color = clBlack
            Expanded = False
            FieldName = 'MatchId'
            Font.Charset = DEFAULT_CHARSET
            Font.Color = clWhite
            Font.Height = -11
            Font.Name = 'Tahoma'
            Font.Style = []
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'Runde'
            Width = 117
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'matchday'
            Title.Caption = 'Matchday'
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'HomeNick'
            Width = 73
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'HomeG'
            Width = 40
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'GuestG'
            Width = 45
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'GuestNick'
            Width = 70
            Visible = True
          end>
      end
      object spieleintragenB: TButton
        Left = 511
        Top = 258
        Width = 191
        Height = 25
        Caption = 'Spiel eintragen'
        TabOrder = 2
        OnClick = spieleintragenBClick
      end
      object matchLoeschenB: TButton
        Left = 511
        Top = 289
        Width = 191
        Height = 25
        Caption = 'L'#246'schen'
        TabOrder = 3
        OnClick = matchLoeschenBClick
      end
      object tableCreateP: TPanel
        Left = 511
        Top = 67
        Width = 191
        Height = 103
        TabOrder = 4
        object hinrundeCH: TCheckBox
          Left = 0
          Top = 8
          Width = 97
          Height = 17
          Caption = 'Hinrunde'
          Checked = True
          State = cbChecked
          TabOrder = 0
        end
        object rueckrundeCH: TCheckBox
          Left = 0
          Top = 31
          Width = 97
          Height = 17
          Caption = 'R'#252'ckrunde'
          TabOrder = 1
        end
        object gruppeCB: TDBLookupComboBox
          Left = 0
          Top = 76
          Width = 145
          Height = 21
          KeyField = 'id'
          ListField = 'name'
          ListSource = queryStageDS
          TabOrder = 2
        end
        object spielplanB: TButton
          Left = 72
          Top = 0
          Width = 105
          Height = 57
          Caption = 'Spielplan erstellen'
          TabOrder = 3
          OnClick = spielplanBClick
        end
      end
      object filterCB: TDBLookupComboBox
        Left = 545
        Top = 187
        Width = 145
        Height = 21
        KeyField = 'id'
        ListField = 'name'
        ListSource = Form1.stagesDS
        TabOrder = 5
        OnCloseUp = filterCBCloseUp
      end
    end
    object tabellenTS: TTabSheet
      Caption = 'Tabellen'
      ImageIndex = 3
      ExplicitLeft = 0
      ExplicitTop = 16
      object Label5: TLabel
        Left = 3
        Top = 163
        Width = 28
        Height = 13
        Caption = 'Filter:'
      end
      object Label8: TLabel
        Left = 3
        Top = 333
        Width = 28
        Height = 13
        Caption = 'Filter:'
      end
      object TabelleSG: TStringGrid
        Left = 3
        Top = 16
        Width = 596
        Height = 137
        ColCount = 8
        TabOrder = 0
      end
      object tableGroupCB: TDBLookupComboBox
        Left = 49
        Top = 159
        Width = 145
        Height = 21
        KeyField = 'id'
        ListField = 'name'
        ListSource = queryStageDS
        TabOrder = 1
        OnCloseUp = tableGroupCBCloseUp
      end
      object tabelleBSG: TStringGrid
        Left = 3
        Top = 186
        Width = 596
        Height = 137
        ColCount = 8
        TabOrder = 2
      end
      object tableGroupBCB: TDBLookupComboBox
        Left = 49
        Top = 329
        Width = 145
        Height = 21
        KeyField = 'id'
        ListField = 'name'
        ListSource = queryStageDS
        TabOrder = 3
        OnCloseUp = tableGroupBCBCloseUp
      end
    end
  end
  object queryCombination: TZQuery
    Connection = Form1.sqlconnection
    Active = True
    SQL.Strings = (
      'SELECT stages.name AS Gruppe, users.nick AS Nick, '
      
        'teams.name AS Team, combinations.ID as ID FROM teams,users,combi' +
        'nations,stages '
      'WHERE combinations.userID=users.ID '
      'AND combinations.teamID=teams.ID'
      'AND combinations.stageId=stages.ID')
    Params = <>
    Left = 784
    Top = 208
  end
  object queryCombinationDS: TDataSource
    DataSet = queryCombination
    Left = 856
    Top = 208
  end
  object queryTeam: TZQuery
    Connection = Form1.sqlconnection
    SortedFields = 'name'
    SQL.Strings = (
      'SELECT * FROM teams')
    Params = <>
    IndexFieldNames = 'name Asc'
    Left = 784
    Top = 264
  end
  object queryTeamDS: TDataSource
    DataSet = queryTeam
    Left = 856
    Top = 264
  end
  object deleteCombi: TZTable
    Connection = Form1.sqlconnection
    TableName = 'combinations'
    Left = 784
    Top = 328
  end
  object queryMatch: TZQuery
    Connection = Form1.sqlconnection
    SortedFields = 'MatchId'
    SQL.Strings = (
      'SELECT matches.Id AS MatchId,'
      '       u1.nick AS HomeNick,'
      '       t1.name AS HomeName,'
      '       matches.HomeG,     '
      '       matches.GuestG,    '
      '       t2.name AS GuestName,'
      '       u2.nick AS GuestNick,'
      '       stages.name AS Runde,'
      '       matches.winner'
      
        'FROM matches,combinations c1,combinations c2,users u1,users u2, ' +
        'teams t1, teams t2, stages '
      'WHERE '
      ' c1.userId=u1.Id AND'
      ' c2.userId=u2.Id AND'
      ' c1.teamId=t1.id AND'
      ' c2.teamId=t2.id AND'
      ' matches.homeC=c1.id AND'
      ' matches.guestC=c2.id AND'
      ' matches.stageID=stages.id'
      '')
    Params = <>
    IndexFieldNames = 'MatchId Asc'
    Left = 784
    Top = 144
  end
  object queryMatchDS: TDataSource
    DataSet = queryMatch
    Left = 856
    Top = 144
  end
  object deleteMatch: TZTable
    Connection = Form1.sqlconnection
    TableName = 'matches'
    Left = 784
    Top = 384
  end
  object queryStage: TZQuery
    Connection = Form1.sqlconnection
    Active = True
    SQL.Strings = (
      'SELECT * FROM `stages` WHERE knockout='#39'0'#39' AND NOT id=1')
    Params = <>
    Left = 784
    Top = 80
  end
  object queryStageDS: TDataSource
    DataSet = queryStage
    Left = 856
    Top = 80
  end
end
